using UnityEngine;
using System.Collections;

public class WallColision : MonoBehaviour 
{
	public GameObject player;
	public GameObject otherWall;
	
	void Start () 
	{
        player = GameObject.FindGameObjectWithTag("Player");
	}

	public void SendToOtherPosition()
	{
        Vector3 relativePosition = transform.InverseTransformDirection(transform.position.x, player.transform.position.y, player.transform.position.z);
        player.transform.position = new Vector3(relativePosition.x + 2, player.transform.position.y, player.transform.position.z);
	}
}
